<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Voro++: voro::c_loop_subset Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Voro++
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript" src="dynsections.js"></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>voro</b>      </li>
      <li class="navelem"><a class="el" href="classvoro_1_1c__loop__subset.html">c_loop_subset</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">voro::c_loop_subset Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="voro::c_loop_subset" --><!-- doxytag: inherits="voro::c_loop_base" -->
<p>Class for looping over a subset of particles in a container.  
 <a href="classvoro_1_1c__loop__subset.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="c__loops_8hh_source.html">c_loops.hh</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for voro::c_loop_subset:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classvoro_1_1c__loop__subset.png" usemap="#voro::c_loop_subset_map" alt=""/>
  <map id="voro::c_loop_subset_map" name="voro::c_loop_subset_map">
<area href="classvoro_1_1c__loop__base.html" title="Base class for looping over particles in a container." alt="voro::c_loop_base" shape="rect" coords="0,0,125,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class c_class &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#aab236b412de99f7a58d77d23a25ff44f">c_loop_subset</a> (c_class &amp;con)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#a585f47e725dc0de645defc8dc0d463cb">setup_sphere</a> (double vx, double vy, double vz, double r, bool bounds_test=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#a2aba9be724d35e088e3597dc9181182d">setup_box</a> (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, bool bounds_test=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#a688ef02340f6a9bc64c77c2de4c4ae3d">setup_intbox</a> (int ai_, int bi_, int aj_, int bj_, int ak_, int bk_)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#a4c9709bc992e33668471e292474c39f4">start</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#af45a6a610d039dc8c8434caf61b092c6">inc</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">c_loop_subset_mode&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1c__loop__subset.html#ac5d8b2aa34f936022e9059ca093b914c">mode</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class can loop over a subset of particles in a certain geometrical region within the container. The class can be set up to loop over a rectangular box or sphere. It can also rectangular group of internal computational blocks. </p>

<p>Definition at line <a class="el" href="c__loops_8hh_source.html#l00224">224</a> of file <a class="el" href="c__loops_8hh_source.html">c_loops.hh</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aab236b412de99f7a58d77d23a25ff44f"></a><!-- doxytag: member="voro::c_loop_subset::c_loop_subset" ref="aab236b412de99f7a58d77d23a25ff44f" args="(c_class &amp;con)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class c_class &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">voro::c_loop_subset::c_loop_subset </td>
          <td>(</td>
          <td class="paramtype">c_class &amp;&#160;</td>
          <td class="paramname"><em>con</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The constructor copies several necessary constants from the base container class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">con</td><td>the container class to use. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="c__loops_8hh_source.html#l00234">234</a> of file <a class="el" href="c__loops_8hh_source.html">c_loops.hh</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af45a6a610d039dc8c8434caf61b092c6"></a><!-- doxytag: member="voro::c_loop_subset::inc" ref="af45a6a610d039dc8c8434caf61b092c6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool voro::c_loop_subset::inc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Finds the next particle to test. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there is another particle, false if no more particles are available. </dd></dl>

<p>Definition at line <a class="el" href="c__loops_8hh_source.html#l00244">244</a> of file <a class="el" href="c__loops_8hh_source.html">c_loops.hh</a>.</p>

</div>
</div>
<a class="anchor" id="a2aba9be724d35e088e3597dc9181182d"></a><!-- doxytag: member="voro::c_loop_subset::setup_box" ref="a2aba9be724d35e088e3597dc9181182d" args="(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, bool bounds_test=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void voro::c_loop_subset::setup_box </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xmin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xmax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ymin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ymax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zmin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zmax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bounds_test</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initializes the class to loop over all particles in a rectangular box. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">(xmin,xmax)</td><td>the minimum and maximum x coordinates of the box. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">(ymin,ymax)</td><td>the minimum and maximum y coordinates of the box. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">(zmin,zmax)</td><td>the minimum and maximum z coordinates of the box. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bounds_test</td><td>whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given box. If it is true, the particle will only loop over the particles which actually lie within the box. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there is any valid point to loop over, false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="c__loops_8cc_source.html#l00098">98</a> of file <a class="el" href="c__loops_8cc_source.html">c_loops.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a688ef02340f6a9bc64c77c2de4c4ae3d"></a><!-- doxytag: member="voro::c_loop_subset::setup_intbox" ref="a688ef02340f6a9bc64c77c2de4c4ae3d" args="(int ai_, int bi_, int aj_, int bj_, int ak_, int bk_)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void voro::c_loop_subset::setup_intbox </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ai_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bi_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>aj_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bj_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ak_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bk_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initializes the class to loop over all particles in a rectangular subgrid of blocks. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">(ai_,bi_)</td><td>the subgrid range in the x-direction, inclusive of both ends. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">(aj_,bj_)</td><td>the subgrid range in the y-direction, inclusive of both ends. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">(ak_,bk_)</td><td>the subgrid range in the z-direction, inclusive of both ends. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there is any valid point to loop over, false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="c__loops_8cc_source.html#l00044">44</a> of file <a class="el" href="c__loops_8cc_source.html">c_loops.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a585f47e725dc0de645defc8dc0d463cb"></a><!-- doxytag: member="voro::c_loop_subset::setup_sphere" ref="a585f47e725dc0de645defc8dc0d463cb" args="(double vx, double vy, double vz, double r, bool bounds_test=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void voro::c_loop_subset::setup_sphere </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>vx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>vy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>vz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bounds_test</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initializes a <a class="el" href="classvoro_1_1c__loop__subset.html" title="Class for looping over a subset of particles in a container.">c_loop_subset</a> object to scan over all particles within a given sphere. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">(vx,vy,vz)</td><td>the position vector of the center of the sphere. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">r</td><td>the radius of the sphere. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bounds_test</td><td>whether to do detailed bounds checking. If this is false then the class will loop over all particles in blocks that overlap the given sphere. If it is true, the particle will only loop over the particles which actually lie within the sphere. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there is any valid point to loop over, false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="c__loops_8cc_source.html#l00024">24</a> of file <a class="el" href="c__loops_8cc_source.html">c_loops.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a4c9709bc992e33668471e292474c39f4"></a><!-- doxytag: member="voro::c_loop_subset::start" ref="a4c9709bc992e33668471e292474c39f4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool voro::c_loop_subset::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Starts the loop by finding the first particle within the container to consider. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there is any particle to consider, false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="c__loops_8cc_source.html#l00079">79</a> of file <a class="el" href="c__loops_8cc_source.html">c_loops.cc</a>.</p>

</div>
</div>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ac5d8b2aa34f936022e9059ca093b914c"></a><!-- doxytag: member="voro::c_loop_subset::mode" ref="ac5d8b2aa34f936022e9059ca093b914c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">c_loop_subset_mode <a class="el" href="classvoro_1_1c__loop__subset.html#ac5d8b2aa34f936022e9059ca093b914c">voro::c_loop_subset::mode</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The current mode of operation, determining whether tests should be applied to particles to ensure they are within a certain geometrical object. </p>

<p>Definition at line <a class="el" href="c__loops_8hh_source.html#l00229">229</a> of file <a class="el" href="c__loops_8hh_source.html">c_loops.hh</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="c__loops_8hh_source.html">c_loops.hh</a></li>
<li><a class="el" href="c__loops_8cc_source.html">c_loops.cc</a></li>
</ul>
</div>


<hr class="footer"/><address class="footer"><small>
Generated on Fri Sep 23 2011 22:49:07 for Voro++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
